Repository navigation
Conversation
87e9ed2 to
67f9615
Compare
| // Send the file list in the request body to avoid too long URLs. | ||
| // A native form submission lets the browser stream the archive to disk. | ||
| const form = document.createElement('form') | ||
| form.method = 'POST' |
There was a problem hiding this comment.
Tested locally: zipping a folder that contains a view-only share returns a 403 here. With a form submit, wouldn't the browser end up on that error page instead of staying in Files?
There was a problem hiding this comment.
This is a bit tricky, I will try to figure out a solution
When downloading multiple files as a ZIP archive, filenames were appended to the URL as query parameters, causing "414 Request-URI Too Long" errors with many files. Backend now supports POST requests with files in request body. Frontend sends files via FormData in POST body instead of URL params. Fixes #7935 Signed-off-by: nfebe <fenn25.fn@gmail.com>
Downloading the archive through axios as a blob buffered the whole archive in memory and then failed, as HEAD requests on blob URLs are not allowed. Submit a hidden form instead so the browser streams the download natively. Also reject non-string `files` parameters instead of failing with a TypeError. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
67f9615 to
778b469
Compare
|
We hit this on a production Nextcloud 35.0.1 (Apache 2.4.58, PHP-FPM through mod_proxy_fcgi, HTTP/1.1). Selecting files with long Japanese names failed at about 20 files. The Files app reported "The requested files are not available." The request never reached the app: a probe of Raising The hidden form POST in this PR is the approach that worked for us. On 35.0.1 we taught We still carry that as a local patch because this host stays on 35.0.1. Happy to retest once this lands. |
When downloading multiple files as a ZIP archive, filenames were appended to the URL as query parameters, causing "414 Request-URI Too Long" errors with many files.
Backend now supports POST requests with files in request body. Frontend sends files via FormData in POST body instead of URL params.
Fixes #7935